package cn.anecansaitin.whimsy.client.registers;

import cn.anecansaitin.whimsy.Whimsy;
import com.mojang.blaze3d.platform.InputConstants;
import net.minecraft.client.KeyMapping;
import net.neoforged.api.distmarker.Dist;
import net.neoforged.bus.api.SubscribeEvent;
import net.neoforged.fml.common.Mod;
import net.neoforged.neoforge.client.event.RegisterKeyMappingsEvent;
import net.neoforged.neoforge.client.settings.KeyConflictContext;
import net.neoforged.neoforge.client.settings.KeyModifier;
import net.neoforged.neoforge.common.util.Lazy;
import org.lwjgl.glfw.GLFW;

@Mod.EventBusSubscriber(modid = Whimsy.MODID, bus = Mod.EventBusSubscriber.Bus.MOD, value = Dist.CLIENT)
public class ModKeyMappings {
    //战斗模式快捷键
    public static final Lazy<KeyMapping> BATTLE_MODE = Lazy.of(() -> new KeyMapping("key." + Whimsy.MODID + ".battle_mode", KeyConflictContext.IN_GAME, KeyModifier.CONTROL, InputConstants.Type.KEYSYM, GLFW.GLFW_KEY_G, "key.categories." + Whimsy.MODID));

    @SubscribeEvent
    public static void register(RegisterKeyMappingsEvent event) {
        event.register(BATTLE_MODE.get());
    }
}
